@echo off
SET SERVICE_NAME=DevOpsAgentService
SET BINARY_PATH=%~dp0devops-runner.exe
SET CONFIG_PATH=%~dp0devops_agent_config.json

echo Installing DevOps Agent as Windows Service...
sc create %SERVICE_NAME% binPath= "%BINARY_PATH% -config %CONFIG_PATH%" start= auto displayname= "DevOps Agent Service"
sc description %SERVICE_NAME% "DevOps Agent Service for Server Communication"

echo Starting DevOps Agent Service...
net start %SERVICE_NAME%
